feat(credential-status-router): Added basic router implementation & verifier/ manager encapsulation#1022
Conversation
mirceanis
left a comment
There was a problem hiding this comment.
Thanks for posting this!
I need help understanding some of the methods defined.
I'd really like to maintain the separation of concerns between Verifier and Manager
| /** | ||
| * Returns the revocation status of a credential from a given managed method | ||
| */ | ||
| statusRouterCheckStatus(args: ICheckCredentialStatusArgs, context: IAgentContext<IResolver>): Promise<CredentialStatus> |
There was a problem hiding this comment.
This method should be described by the ICredentialStatusVerifier interface.
If the ICredentialStatusRouter interface is supposed to be a merge between ICredentialStatusVerifier and ICredentialStatusManager, then we can declare that merger directly instead of redefining the methods.
| * @param args - Input arguments to request the verifiable credential status value | ||
| * @returns A {@link VerifiableCredential} object | ||
| */ | ||
| statusRouterParseStatus(args: CredentialStatusRequestArgs, context: IAgentContext<any>): Promise<VerifiableCredential> |
There was a problem hiding this comment.
I don't really understand the use of this method.
Can you help me figure out how it fits into the greater model?
| /** | ||
| * | ||
| */ | ||
| credentialStatusRead(args: CredentialStatusRequestArgs, context: IAgentContext<any>): Promise<VerifiableCredential> |
There was a problem hiding this comment.
What is the purpose of this method?
I think that statusRead/statusCheck operations should be reserved for the ICredentialStatusVerifier interface, but perhaps I'm misunderstanding how this fits in.
Can you add some description to it?
| constructor(options: { | ||
| statusMethods: Record<string, AbstractStatusMethod> | ||
| defaultStatusMethod: string | ||
| storage?: AbstractStatusStorage |
There was a problem hiding this comment.
It looks like the storage parameter is not actually used by this class. It looks safe to remove.
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Ref on architecture on Veramo's Discord channel #credential-status.
This is a router that handles top-level routing logic for different status methods in one agent, extending the
AbstractStatusMethodabstract class each.Base methods inherit from existing
ICredentialStatusVerifier&ICredentialStatusManager.Preparing a thorough coverage test case version, but the structure should suffice for
credential-status-list-2021tests.